<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
		.div1 {
			height: 100px;
			width: 100px;
			background-color: red;
		}
		.div2 {
			height: 50px;
			width: 50px;
			border: 3px solid black;
			background-color: inherit;
		}
	</style>
</head>
<body>
	<div class="div1">
		<div class="div2"></div>
	</div>
</body>
</html>